document = {
    createElement: function(val){
        if(val === 'a'){
            return new HTMLAnchorElement()
        }
    }
}

HTMLAnchorElement = function(){};
HTMLAnchorElement.prototype.host = '';
HTMLAnchorElement.prototype.href = '';
HTMLAnchorElement.prototype._HTMLAnchorElement_href = '';

Object.defineProperty(HTMLAnchorElement.prototype, 'href', {
    set: function(){
        this.host = arguments[0].split('/').at(-1);
        this._HTMLAnchorElement_href = arguments[0];
        return arguments[0]
    },
    get: function(){
        return this._HTMLAnchorElement_href;
    },
})

a = document.createElement('a')
a.href = 'https://www.yuanrenxue.com'
console.log(a.host)
